package zjitc.interfa2.wuliu;

/**
 * @author:胡新雨
 * @date：2019/3/26 9:57
 */
public class Express {

    String number;
    double weight;
    Express(){

    }
    Express(String number,double weight){
        this.number=number;
        this.weight=weight;

    }
    /**
     * 发货前方法
     * */
    void sendBefore(){
        System.out.println("订单开始处理");
        System.out.println("快递单号："+number);
        System.out.println("货物重量："+weight);
    }
    void send(Car car){
        System.out.println("运货人"+car.getDriver()+"正驾驶编号为"+car.getNumber()
                           +"的"+car.getType()+"发送货物");
        car.transport();

    }
    void sendAfter(Car car){
        System.out.println("货物运输完成");
        System.out.println(car.getDriver()+"已将编号为"+car.getNumber()+
                "的"+car.getType()+"归还");
        Truck truck=(Truck) car;
        truck.keep();

    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getNumber() {
        return number;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public double getWeight() {
        return weight;
    }
}
